package user_assets

import (
	"net/http"

	"gitee.com/liuxuezhan/ar-platform/base-common/result"

	"gitee.com/liuxuezhan/ar-platform/assets-api/internal/logic/user_assets"
	"gitee.com/liuxuezhan/ar-platform/assets-api/internal/svc"
)

// 用户银行卡信息 - 查询
func UserBankInfoHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
	return func(w http.ResponseWriter, r *http.Request) {

		l := user_assets.NewUserBankInfoLogic(r.Context(), svcCtx)
		resp, err := l.UserBankInfo()
		if err != nil {
			result.HttpErrorResult(r.Context(), w, err)
		} else {
			result.HttpSuccessResult(r.Context(), w, resp)
		}
	}
}
